package com.ape.mapsa.produccion.dao;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.ape.mapsa.produccion.model.Formula;
import com.ape.mapsa.produccion.model.FormulaMp;

@Repository
public class FormulaMpDAOImpl extends GenericDAOImpl<FormulaMp, Long> implements FormulaMpDAO {

	@Override
	public List<FormulaMp> getByFormulaId(Formula id) {
		return sessionFactory.getCurrentSession().createCriteria(FormulaMp.class).add(Restrictions.eq("formula", id)).list();
	}

}
